package com.nbsaas.boot;

import org.codehaus.commons.compiler.CompileException;
import org.codehaus.commons.compiler.IScriptEvaluator;
import org.codehaus.janino.ScriptEvaluator;

public class Demo {

    public static void main(String[] args) throws CompileException {

        IScriptEvaluator se =new ScriptEvaluator();
        MyInterface d5=(MyInterface)se.createFastEvaluator(
                "System.out.println(\"Hello\");\n"
                        +"String s =\"world\";\n"
                        +"System.out.println(s);\n"
                        + "return true;\n",
                MyInterface.class,
                new String[0]);
        boolean res =d5.gpForIt();
                System.out.println( res);
    }
}
